package com.huawei.appgallery.assistantdock.buoydock.card.card;

import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
import com.huawei.appgallery.assistantdock.base.cardkit.card.BuoyBaseCard;
import com.huawei.appgallery.assistantdock.buoydock.card.bean.BuoyForumNoticeItem;
import com.huawei.appgallery.foundation.ui.framework.cardframe.bean.BaseCardBean;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import o.beo$e;
import o.beq;
import o.bgf;
import o.cgz;
import o.chy;
import o.Logger;
import o.evx;

public class BuoyForumNoticeItemCardBuoy extends BuoyBaseCard {
    public BuoyForumNoticeItemCardBuoy(Context context) {
        super(context);
    }

    public cgz ˏ(View view) {
        ʽ(view);
        return this;
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        TextView textView = (TextView) ˉ().findViewById(beo$e.ـ);
        if (textView != null && (cardBean instanceof BuoyForumNoticeItem)) {
            textView.setText(((BuoyForumNoticeItem) cardBean).ˊ());
        }
    }

    public void ॱ(chy o_chy) {
        ˉ().setOnClickListener(new evx(this) {
            final /* synthetic */ BuoyForumNoticeItemCardBuoy ॱ;

            {
                this.ॱ = r1;
            }

            public void ˋ(View view) {
                if (this.ॱ.ˊᐝ != null) {
                    Object ॱॱ = this.ॱ.ˊᐝ.ॱॱ();
                    if (TextUtils.isEmpty(ॱॱ)) {
                        Logger.ˎ("BuoyForumNoticeItemCardBuoy", "detailId is empty");
                    } else if (ॱॱ.startsWith("buoy_forum")) {
                        bgf.ˊ().ˎ(this.ॱ.ʼॱ, this.ॱ.ˊᐝ.ॱॱ());
                    } else {
                        bgf.ˊ().ˏ(this.ॱ.ʼॱ, this.ॱ.ˊᐝ.ॱॱ());
                    }
                    beq.ˊ(this.ॱ.ˊᐝ.ॱॱ());
                    if (this.ॱ.ˊᐝ instanceof BaseCardBean) {
                        beq.ˎ((BaseCardBean) this.ॱ.ˊᐝ);
                    }
                }
            }
        });
    }
}
